<!--
 * @Descripttion: 
 * @version: 1.0
 * @Author: cwyy
 * @Date: 2023-07-02 22:22:00
 * @LastEditTime: 2023-07-13 11:21:26
-->
<template>
    <a-page-header title="关于" @back="$router.go(-1)" />
    <a-row>
        <a-col :span="22" :offset="1">
            <a-divider />
            <a-row :gutter="32">
                <a-col :span="8"
                    ><a-typography-title :level="3">关于太一·学术</a-typography-title>
                    <p>“推荐大模型的首个落地应用”</p>
                </a-col>
                <a-col :span="14">
                    <!-- ${htmlMd} -->
                  <p v-html="htmlMd" />
                </a-col>
            </a-row>
        </a-col>
    </a-row>
    <a-row>
        <a-col :span="22" :offset="1">
            <a-divider />
            <a-row :gutter="32">
                <a-col :span="8"
                    ><a-typography-title :level="3">安装信息</a-typography-title>
                    <p>此处展示关于系统的详细信息。</p>
                </a-col>
                <a-col :span="14">
                    <table>
                        <tr>
                            <td class="td_left"><a-typography-text strong>版本:</a-typography-text></td>
                            <td>{{ config.version }}</td>
                        </tr>
                        <tr>
                            <td class="td_left"><a-typography-text strong>构建日期:</a-typography-text></td>
                            <td>{{ buildDate }}</td>
                        </tr>
                        <tr>
                            <td><br /></td>
                        </tr>
                        <tr v-for="item in dependencies" :key="item.name">
                            <td class="td_left">
                                <a-typography-text strong>{{ item.name }}:</a-typography-text>
                            </td>
                            <td>
                                <a-typography-text>{{ item.version }}</a-typography-text>
                            </td>
                        </tr>
                    </table>
                </a-col>
            </a-row>
        </a-col>
    </a-row>
</template>
<script>
import { defineComponent } from 'vue'
import config from '../../package.json'
export default defineComponent({
    components: {},
    setup() {
        // const md = require('markdown-it')()
        // const htmlMd = md.render('@/assets/about.md')
        const htmlMd = require('@/assets/about.md')
        const dependencies = Object.entries(config.dependencies).map((i) => {
            return {
                name: i[0],
                version: i[1].replace(/\^/g, ''),
            }
        })
        return {
            config,
            htmlMd,
            dependencies,
            buildDate: process.env.BUILD_TIME,
        }
    },
})
</script>

<style scoped>
.td_left {
    padding-right: 32px;
}
</style>
